import * as echarts from 'echarts'
export const LeftTopOptions = {
  backgroundColor: '#050A32',
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      // 坐标轴指示器，坐标轴触发有效
      type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
    }
  },
  grid: {
    left: '2%',
    right: '4%',
    bottom: '14%',
    top: '16%',
    containLabel: true
  },
  legend: {
    data: ['官网', '去哪了', '美团'],
    right: 10,
    top: 12,
    textStyle: {
      color: '#fff'
    },
    itemWidth: 12,
    itemHeight: 10
    // itemGap: 35
  },
  xAxis: {
    type: 'category',
    data: ['03-15', '03-16', '03-17'],
    axisLine: {
      lineStyle: {
        color: 'white'
      }
    },
    axisLabel: {
      // interval: 0,
      // rotate: 40,
      textStyle: {
        fontFamily: 'Microsoft YaHei'
      }
    }
  },

  yAxis: {
    type: 'value',
    max: '1200',
    axisLine: {
      show: false,
      lineStyle: {
        color: 'white'
      }
    },
    splitLine: {
      show: true,
      lineStyle: {
        color: 'rgba(255,255,255,0.3)'
      }
    },
    axisLabel: {}
  },
  series: [
    {
      name: '美团',
      type: 'bar',
      barWidth: '12%',
      itemStyle: {
        normal: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            {
              offset: 0,
              color: '#fccb05'
            },
            {
              offset: 1,
              color: '#f5804d'
            }
          ]),
          barBorderRadius: 4
        }
      },
      data: [400, 400, 300, ]
    },
    {
      name: '去哪了',
      type: 'bar',
      barWidth: '12%',
      itemStyle: {
        normal: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            {
              offset: 0,
              color: '#8bd46e'
            },
            {
              offset: 1,
              color: '#09bcb7'
            }
          ]),
          barBorderRadius: 4
        }
      },
      data: [400, 500, 500, ]
    },
    {
      name: '官网',
      type: 'bar',
      barWidth: '12%',
      itemStyle: {
        normal: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            {
              offset: 0,
              color: '#248ff7'
            },
            {
              offset: 1,
              color: '#6851f1'
            }
          ]),
          barBorderRadius: 4
        }
      },
      data: [400, 600, 700, ]
    }
  ]
}
